//加评论
function addComment(obj,uid){
	var comment = $.trim($("#comment_text_"+obj).val());
	if(comment==""||comment.length>500){
		return false;
	}
	var params = {
			"comment.askId" : obj,"comment.commentBody":comment,
			"comment.questionUid":uid
	};
	var url = "../commentAjax/addComment.action";
	doAjax(url, params, function(ajaxResult){
		if (ajaxResult.OK) {
			alert('评论成功');
		}
	});
}
//回答
function answerASK(askId,extendId){
	var params = {
			"answer.askId" : askId,"answer.answerEntendsId":extendId
	};
	var url = "../answerAjax/answer.action";
	doAjax(url, params, function(ajaxResult){
		if (ajaxResult.OK) {
			alert('回答成功');
			//调用问题统计函数，展示统计信息
			getAnswerInfo(askId)
		}
	});
}
//获得回答统计详情
function getAnswerInfo(askId){
	var params = {
			"askId" : askId
	};
	var url = "../answerAjax/getInfo.action";
	doAjax(url, params, function(ajaxResult){
		if (ajaxResult.OK) {
			alert(ajaxResult.resultMap.answerInfo);
		}
	});
}